#pragma once

#include "imgui/node/pch.h"
#include <iostream>

namespace ImNodes
{
    struct Pin
    {
        int m_Id;
        int m_NodeId;
        std::string m_Label;
        int m_Width;

        Pin(int &pinIndex, const int nodeId, const std::string &label = "")
            : m_Id(pinIndex++), m_NodeId(nodeId), m_Label(label), m_Width(100) {

              };

        bool RelateNode(const int nodeId)
        {
            return m_NodeId == nodeId;
        }
    };

    struct FloatPin : public ImNodes::Pin
    {
        float m_Value = 0.0f;

        FloatPin(int &pinIndex, const int nodeId, const std::string &label = "") : ImNodes::Pin(pinIndex, nodeId, label)
        {
        }
    };
    struct StringPin : public ImNodes::Pin
    {
        std::string m_Value;

        StringPin(int &pinIndex, const int nodeId, const std::string &label = "") : ImNodes::Pin(pinIndex, nodeId, label), m_Value("")
        {
        }
    };

    struct IntPin : public ImNodes::Pin
    {
        int m_Value;

        IntPin(int &pinIndex, const int nodeId, const std::string &label = "") : ImNodes::Pin(pinIndex, nodeId, label),
                                                                                  m_Value(0)
        {
        }
    };

};
